/**
 * 
 */
package com.lehecai.core.api.lottery;

import java.util.Iterator;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.lehecai.core.api.AbstractApiResultBean;

/**
 * @author chirowong
 * 用户不同账号间转账
 */
public class ManuallyTransfer extends AbstractApiResultBean {
	public static final String QUERY_FROM_UID = "from_uid";
	public static final String QUERY_TO_UID = "to_uid";
	public static final String QUERY_WALLET_TYPE = "wallet_type";
	public static final String SET_AMOUNT = "amount";
	public static final String QUERY_TRANSFER_ID = "transfer_id";
	
	private String transferId;
	
	public static ManuallyTransfer convertFromJSONArray(JSONArray array) {
		if (array == null) {
			return null;
		}
		ManuallyTransfer transfer = new ManuallyTransfer();
		for (Iterator<?> iterator = array.iterator(); iterator.hasNext();) {
			JSONObject object = (JSONObject) iterator.next();
			transfer.setTransferId(object.getString(QUERY_TRANSFER_ID));
		}
		return transfer;
	}

	public void setTransferId(String transferId) {
		this.transferId = transferId;
	}

	public String getTransferId() {
		return transferId;
	}
	
}
